// 怪物卡片
export async function run(characters, items_key, index) {
    let skill_level = G.Characters.get_skill_level(characters, "剧情技能", "变化之术");
    let item = characters[items_key][index];
    item["次数"] -= 1;
    if (item["次数"] === 0) {
        characters[items_key][index] = null;
    }
    // if (skill_level < 6 && skill_level < item["等级"]) {
    //     ClientUtils.send_characters_basic_prompt(characters["id"], "#Y/你的变化之术等级太低了")
    //     return;
    // }
    G.CharactersTask.add_task(characters["id"], 1, {
        "开始时间": Math.floor(Date.now() / 1000),
        "结束时间": Math.floor(Date.now() / 1000) + (15 * (1 + skill_level) * 60),
        "超时取消": true,
        "characters_id": characters["id"],
        "造型": item["造型"],
    });
    ClientUtils.send_characters_basic_prompt(characters["id"], "#Y/你使用了怪物卡片");
    G.EventCallback.publish_event("使用道具", [characters, items_key, index, "怪物卡片"]);
}